﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Domain.aspx.cs" Inherits="Domain" %>
<%@ Register Src="head.ascx" TagName="Head" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>域管理</title>
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
   
</head>
<body>
    <form id="form2" runat="server">
    <div><table width="100%" border="0">
  <tr>
    <td>&nbsp;<uc1:Head ID="Head2" runat="server" />
    </td>
  </tr>
  <tr>
    <td style="height: 485px" align="center" valign="top">
        <br />
        <br />
        范围列表<br />
        <br />
        <asp:GridView ID="gdvList" runat="server" AutoGenerateColumns="False" OnSelectedIndexChanging="gdvList_SelectedIndexChanging" AllowPaging="True" OnRowDeleting="gdvList_RowDeleting" OnRowEditing="gdvList_RowEditing" OnPageIndexChanging="gdvList_PageIndexChanging">
            <Columns>
                <asp:BoundField DataField="DomainID" HeaderText="ID" />
                <asp:BoundField DataField="F1" HeaderText="范围名称" />
                <asp:BoundField DataField="Domain" HeaderText="域名" />
                <asp:BoundField DataField="TimeCheck" HeaderText="是否定期检测" />
                <asp:BoundField DataField="GroupName" HeaderText="用户组" />
                <asp:BoundField DataField="UrlGroup" HeaderText="Url组" />
                <asp:TemplateField HeaderText="域下所有URL">
                    <ItemTemplate>

                    <a href ='Url.aspx?domainID=<%#  DataBinder.Eval(Container.DataItem,   "DomainID")  %>&domain=<%#  DataBinder.Eval(Container.DataItem,   "Domain")  %>' >显示</a>
                  
                   
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:CommandField HeaderText="编辑" ShowEditButton="True" />
                <asp:CommandField HeaderText="删除" ShowDeleteButton="True" />
                <asp:CommandField HeaderText="手动运行" SelectText="手动运行" ShowSelectButton="True" />
            </Columns>
        </asp:GridView>
        <br />
        <table width="300" border="1" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="2">
        添加添加</td>
  </tr>
            <tr>
                <td align="left" style="width: 118px">
                    范围名称：</td>
                <td align="left" width="217">
                    <asp:TextBox ID="txtTitle" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtTitle"
                        Display="None" ErrorMessage="请输入标范围名称"></asp:RequiredFieldValidator></td>
            </tr>
  <tr>
    <td align="left" style="width: 118px">
        域名：</td>
    <td width="217" align="left"><asp:TextBox ID="txtDomain" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="请输入域!" ControlToValidate="txtDomain" BorderStyle="None" Display="None"></asp:RequiredFieldValidator></td>
  </tr>
            <tr>
                <td align="left" style="width: 118px; height: 17px">
                    是否定期检测：</td>
                <td align="left" style="height: 17px" width="217">
                    <asp:CheckBox ID="cbTimeTest" runat="server" Text="定期检测" Width="72px" /></td>
            </tr>
            <tr>
                <td align="left" style="width: 118px; height: 24px;">
                    URL组：</td>
                <td align="left" width="217" style="height: 24px"><asp:DropDownList ID="ddlUrl" runat="server" DataTextField="UrlGroup" DataValueField="UrlGroup">
                </asp:DropDownList></td>
            </tr>
  <tr>
    <td align="left" style="width: 118px">
        消息组接收：</td>
    <td align="left">
        <asp:DropDownList ID="ddlList" runat="server" DataTextField="Name" DataValueField="GroupID">
        </asp:DropDownList></td>
  </tr>
  <tr>
    <td style="width: 118px">&nbsp;</td>
    <td align="left">
        <% if (AddOrUpdateSign == 0)
           {        
        %>
        <asp:Button ID="Button1" runat="server" Text="添加" OnClick="Button1_Click" />
        <%
           } else {        
        %>
        <asp:Button ID="Button2" runat="server" Text="修改" OnClick="Button2_Click" />
       <%
          }
       %>
       </td>
  </tr>
</table>
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
            ShowSummary="False" />
        &nbsp;&nbsp;
        <asp:HiddenField ID="HidDomainId" runat="server" />
    </td>
  </tr>
</table>
    
    </div>
    </form>
</body>
</html>
